<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateYdManageTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //创建管理员表
        Schema::create('yd_manage', function(Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id')->comment('自动编号');
            $table->integer('rank')->unsigned()->default(0)->comment('权重:1');
            $table->smallInteger('role_id')->unsigned()->default(0)->comment('角色编号:1');
            $table->string('email', 255)->comment('邮箱:1');
            $table->string('username', 255)->comment('用户名:1');
            $table->string('password', 255)->comment('密码:1');
            $table->timestamp('login_time')->comment('登录时间:1');
            $table->integer('login_number')->unsigned()->default(0)->comment('登陆次数:1');
            $table->integer('ip')->unsigned()->comment('登录IP:1');
            $table->smallInteger('status')->unsigned()->default(1)->comment('{状态:3}{[0=禁用,1=启用]}');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
